// kX Driver / kX Driver Interface / kX Driver Effects Library
// Copyright (c) Eugene Gavrilov, 2001-2005.
// All rights reserved

/*
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 *   This program is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License for more details.
 *
 *   You should have received a copy of the GNU General Public License
 *   along with this program; if not, write to the Free Software
 *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 */

/* Reverb Lite DSP Program */

const char *reverblt_copyright = "(c) Max Mikhailov and Eugene Gavrilov, 2001-2005";
const char *reverblt_engine = "kX";
const char *reverblt_comment = "Version 0.5";
const char *reverblt_created = "2002";
const char *reverblt_guid = "80100001-0ADF-11D6-BFBC-D4F706E10C52";

const char *reverblt_name = "Reverb Lite";
int   reverblt_itramsize = 2943, reverblt_xtramsize = 62590;

dsp_register_info reverblt_info[] = {
	{"inl", 0x4000, 0x7, 0xffff, 0x0},
	{"inr", 0x4001, 0x7, 0xffff, 0x0},
	{"outfl", 0x8000, 0x8, 0xffff, 0x0},
	{"outfr", 0x8001, 0x8, 0xffff, 0x0},
	{"outrl", 0x8002, 0x8, 0xffff, 0x0},
	{"outrr", 0x8003, 0x8, 0xffff, 0x0},
	{"decay", 0x8004, 0x4, 0xffff, 0x26666666},
	{"ealt", 0x8005, 0x4, 0xffff, 0x33333333},
	{"dfsn", 0x8006, 0x4, 0xffff, 0x3fffffff},
	{"wetmix", 0x8007, 0x4, 0xffff, 0x7fffffff},
	{"_01", 0x8008, 0x1, 0xffff, 0x0},
	{"_02", 0x8009, 0x1, 0xffff, 0x0},
	{"_03", 0x800a, 0x1, 0xffff, 0x0},
	{"_04", 0x800b, 0x1, 0xffff, 0x0},
	{"_05", 0x800c, 0x1, 0xffff, 0x0},
	{"_06", 0x800d, 0x1, 0xffff, 0x0},
	{"_07", 0x800e, 0x1, 0xffff, 0x570a3d6f},
	{"_08", 0x800f, 0x1, 0xffff, 0x27ae147a},
	{"_09", 0x8010, 0x1, 0xffff, 0xeccccccc},
	{"_10", 0x8011, 0x1, 0xffff, 0xe6666666},
	{"_12", 0x8012, 0x1, 0xffff, 0x2ccccccc},
	{"_13", 0x8013, 0x1, 0xffff, 0xcf5c28f6},
	{"_14", 0x8014, 0x1, 0xffff, 0xccccccc},
	{"_15", 0x8015, 0x1, 0xffff, 0x30a3d709},
	{"_16", 0x8016, 0x1, 0xffff, 0x26666666},
	{"_17", 0x8017, 0x3, 0xffff, 0x0},
	{"_18", 0x8018, 0x3, 0xffff, 0x0},
	{"_19", 0x8019, 0x3, 0xffff, 0x0},
	{"_20", 0x801a, 0x3, 0xffff, 0x0},
	{"_21", 0x801b, 0x3, 0xffff, 0x0},
	{"_22", 0x801c, 0x3, 0xffff, 0x0},
	{"_23", 0x801d, 0x49, 0xffff, 0x0},
	{"_24", 0x801e, 0xb, 0xffff, 0x0},
	{"_25", 0x801f, 0x29, 0xffff, 0x9d},
	{"_26", 0x8020, 0xb, 0xffff, 0x9d},
	{"_27", 0x8021, 0x49, 0xffff, 0xa2},
	{"_28", 0x8022, 0xb, 0xffff, 0xa2},
	{"_29", 0x8023, 0x29, 0xffff, 0x14c},
	{"_30", 0x8024, 0xb, 0xffff, 0x14c},
	{"_31", 0x8025, 0x49, 0xffff, 0x14d},
	{"_32", 0x8026, 0xb, 0xffff, 0x14d},
	{"_33", 0x8027, 0x29, 0xffff, 0x31e},
	{"_34", 0x8028, 0xb, 0xffff, 0x31e},
	{"_35", 0x8029, 0x29, 0xffff, 0x555},
	{"_36", 0x802a, 0xb, 0xffff, 0x555},
	{"_37", 0x802b, 0x29, 0xffff, 0x556},
	{"_38", 0x802c, 0xb, 0xffff, 0x556},
	{"_39", 0x802d, 0x29, 0xffff, 0x5fd},
	{"_40", 0x802e, 0xb, 0xffff, 0x5fd},
	{"_41", 0x802f, 0x29, 0xffff, 0x5fe},
	{"_42", 0x8030, 0xb, 0xffff, 0x5fe},
	{"_43", 0x8031, 0x49, 0xffff, 0x62d},
	{"_44", 0x8032, 0xb, 0xffff, 0x62d},
	{"_45", 0x8033, 0x29, 0xffff, 0x7d6},
	{"_46", 0x8034, 0xb, 0xffff, 0x7d6},
	{"_47", 0x8035, 0x29, 0xffff, 0xa61},
	{"_48", 0x8036, 0xb, 0xffff, 0xa61},
	{"_49", 0x8037, 0x29, 0xffff, 0xa62},
	{"_50", 0x8038, 0xb, 0xffff, 0xa62},
	{"_52", 0x8039, 0x29, 0xffff, 0xaad},
	{"_53", 0x803a, 0xb, 0xffff, 0xaad},
	{"_54", 0x803b, 0x29, 0xffff, 0xaae},
	{"_55", 0x803c, 0xb, 0xffff, 0xaae},
	{"_56", 0x803d, 0x49, 0xffff, 0xadd},
	{"_57", 0x803e, 0xb, 0xffff, 0xadd},
	{"_58", 0x803f, 0x29, 0xffff, 0xb2d},
	{"_59", 0x8040, 0xb, 0xffff, 0xb2d},
	{"_60", 0x8041, 0x29, 0xffff, 0xb2c},
	{"_61", 0x8042, 0xb, 0xffff, 0xb2c},
	{"_62", 0x8043, 0x49, 0xffff, 0xb2e},
	{"_63", 0x8044, 0xb, 0xffff, 0xb2e},
	{"_64", 0x8045, 0x29, 0xffff, 0xb7e},
	{"_65", 0x8046, 0xb, 0xffff, 0xb7e},
	{"_66", 0x8047, 0x29, 0xffff, 0xb7d},
	{"_67", 0x8048, 0xb, 0xffff, 0xb7d},
	{"_68", 0x8049, 0x4a, 0xffff, 0x0},
	{"_69", 0x804a, 0xb, 0xffff, 0x0},
	{"_70", 0x804b, 0x2a, 0xffff, 0xc9f},
	{"_71", 0x804c, 0xb, 0xffff, 0xc9f},
	{"_72", 0x804d, 0x4a, 0xffff, 0xca0},
	{"_73", 0x804e, 0xb, 0xffff, 0xca0},
	{"_74", 0x804f, 0x2a, 0xffff, 0x1993},
	{"_75", 0x8050, 0xb, 0xffff, 0x1993},
	{"_76", 0x8051, 0x4a, 0xffff, 0x1994},
	{"_77", 0x8052, 0xb, 0xffff, 0x1994},
	{"_78", 0x8053, 0x2a, 0xffff, 0x23ed},
	{"_79", 0x8054, 0xb, 0xffff, 0x23ed},
	{"_80", 0x8055, 0x4a, 0xffff, 0x23ee},
	{"_81", 0x8056, 0xb, 0xffff, 0x23ee},
	{"_82", 0x8057, 0x2a, 0xffff, 0x2ce6},
	{"_83", 0x8058, 0xb, 0xffff, 0x2ce6},
	{"_84", 0x8059, 0x4a, 0xffff, 0x2ce7},
	{"_85", 0x805a, 0xb, 0xffff, 0x2ce7},
	{"_86", 0x805b, 0x2a, 0xffff, 0x333a},
	{"_87", 0x805c, 0xb, 0xffff, 0x333a},
	{"_88", 0x805d, 0x4a, 0xffff, 0x333b},
	{"_89", 0x805e, 0xb, 0xffff, 0x333b},
	{"_90", 0x805f, 0x2a, 0xffff, 0x3806},
	{"_92", 0x8060, 0xb, 0xffff, 0x3806},
	{"_93", 0x8061, 0x4a, 0xffff, 0x3807},
	{"_94", 0x8062, 0xb, 0xffff, 0x3807},
	{"_95", 0x8063, 0x2a, 0xffff, 0x4626},
	{"_96", 0x8064, 0xb, 0xffff, 0x4626},
	{"_97", 0x8065, 0x4a, 0xffff, 0x4627},
	{"_98", 0x8066, 0xb, 0xffff, 0x4627},
	{"_99", 0x8067, 0x2a, 0xffff, 0x51e4},
	{"_100", 0x8068, 0xb, 0xffff, 0x51e4},
	{"_101", 0x8069, 0x4a, 0xffff, 0x51e5},
	{"_102", 0x806a, 0xb, 0xffff, 0x51e5},
	{"_103", 0x806b, 0x2a, 0xffff, 0x5d43},
	{"_104", 0x806c, 0xb, 0xffff, 0x5d43},
	{"_105", 0x806d, 0x4a, 0xffff, 0x5d44},
	{"_106", 0x806e, 0xb, 0xffff, 0x5d44},
	{"_107", 0x806f, 0x2a, 0xffff, 0x6573},
	{"_108", 0x8070, 0xb, 0xffff, 0x6573},
	{"_109", 0x8071, 0x4a, 0xffff, 0x6574},
	{"_110", 0x8072, 0xb, 0xffff, 0x6574},
	{"_111", 0x8073, 0x2a, 0xffff, 0x6c51},
	{"_112", 0x8074, 0xb, 0xffff, 0x6c51},
	{"_113", 0x8075, 0x4a, 0xffff, 0x6c52},
	{"_114", 0x8076, 0xb, 0xffff, 0x6c52},
	{"_115", 0x8077, 0x2a, 0xffff, 0x711d},
	{"_116", 0x8078, 0xb, 0xffff, 0x711d},
	{"_117", 0x8079, 0x4a, 0xffff, 0x711e},
	{"_118", 0x807a, 0xb, 0xffff, 0x711e},
	{"_119", 0x807b, 0x2a, 0xffff, 0x75ce},
	{"_120", 0x807c, 0xb, 0xffff, 0x75ce},
	{"_121", 0x807d, 0x4a, 0xffff, 0xb2ce},
	{"_122", 0x807e, 0xb, 0xffff, 0xb2ce},
	{"_123", 0x807f, 0x2a, 0xffff, 0xb77e},
	{"_124", 0x8080, 0xb, 0xffff, 0xb77e},
};

dsp_code reverblt_code[] = {
	{0x0, 0x8019, 0x2040, 0x4000, 0x204f},
	{0x0, 0x8025, 0x8019, 0x2040, 0x2040},
	{0x0, 0x8017, 0x2040, 0x8027, 0x800e},
	{0x1, 0x8017, 0x8017, 0x8029, 0x800f},
	{0x1, 0x8017, 0x8017, 0x802b, 0x800f},
	{0x1, 0x8017, 0x8017, 0x802d, 0x204c},
	{0x1, 0x8017, 0x8017, 0x802f, 0x204c},
	{0x0, 0x801b, 0x801f, 0x8017, 0x2054},
	{0x1, 0x801d, 0x8017, 0x801b, 0x2054},
	{0xe, 0x8017, 0x8045, 0x204d, 0x8047},
	{0x0, 0x803d, 0x801b, 0x2040, 0x2040},
	{0x0, 0x801b, 0x8017, 0x801b, 0x204e},
	{0x1, 0x8018, 0x8019, 0x800c, 0x8004},
	{0x0, 0x8018, 0x8018, 0x800d, 0x8004},
	{0x0, 0x8017, 0x805f, 0x8018, 0x8006},
	{0x1, 0x805d, 0x8018, 0x8017, 0x8006},
	{0x0, 0x8008, 0x2040, 0x8017, 0x8010},
	{0x0, 0x8018, 0x805b, 0x8017, 0x8006},
	{0x1, 0x8059, 0x8017, 0x8018, 0x8006},
	{0x0, 0x8008, 0x8008, 0x8018, 0x8011},
	{0x0, 0x8017, 0x8057, 0x8018, 0x8006},
	{0x1, 0x8055, 0x8018, 0x8017, 0x8006},
	{0x0, 0x8008, 0x8008, 0x8017, 0x8012},
	{0x0, 0x8018, 0x8053, 0x8017, 0x8006},
	{0x1, 0x8051, 0x8017, 0x8018, 0x8006},
	{0x0, 0x8008, 0x8008, 0x8018, 0x8013},
	{0x0, 0x8079, 0x8018, 0x2040, 0x2040},
	{0xe, 0x800a, 0x800a, 0x8014, 0x807b},
	{0x0, 0x8018, 0x804f, 0x800a, 0x8006},
	{0x1, 0x804d, 0x800a, 0x8018, 0x8006},
	{0x0, 0x8009, 0x2040, 0x8018, 0x8015},
	{0x0, 0x8019, 0x804b, 0x8018, 0x8006},
	{0x1, 0x8049, 0x8018, 0x8019, 0x8006},
	{0x0, 0x8008, 0x8008, 0x8019, 0x8013},
	{0x0, 0x801a, 0x2040, 0x4001, 0x204f},
	{0x0, 0x8031, 0x801a, 0x2040, 0x2040},
	{0x0, 0x8017, 0x2040, 0x8033, 0x204d},
	{0x1, 0x8017, 0x8017, 0x8035, 0x8016},
	{0x1, 0x8017, 0x8017, 0x8037, 0x8016},
	{0x1, 0x8017, 0x8017, 0x8039, 0x204c},
	{0x1, 0x8017, 0x8017, 0x803b, 0x204c},
	{0x0, 0x801c, 0x8023, 0x8017, 0x2054},
	{0x1, 0x8021, 0x8017, 0x801c, 0x2054},
	{0xe, 0x8017, 0x803f, 0x204d, 0x8041},
	{0x0, 0x8043, 0x801c, 0x2040, 0x2040},
	{0x0, 0x801c, 0x8017, 0x801c, 0x204e},
	{0x1, 0x8018, 0x801a, 0x800d, 0x8004},
	{0x1, 0x8018, 0x8018, 0x800c, 0x8004},
	{0x0, 0x800c, 0x8019, 0x2040, 0x2040},
	{0x0, 0x8017, 0x8077, 0x8018, 0x8006},
	{0x1, 0x8075, 0x8018, 0x8017, 0x8006},
	{0x0, 0x8009, 0x8009, 0x8017, 0x8010},
	{0x0, 0x8018, 0x8073, 0x8017, 0x8006},
	{0x1, 0x8071, 0x8017, 0x8018, 0x8006},
	{0x0, 0x8009, 0x8009, 0x8018, 0x8011},
	{0x0, 0x8017, 0x806f, 0x8018, 0x8006},
	{0x1, 0x806d, 0x8018, 0x8017, 0x8006},
	{0x0, 0x8009, 0x8009, 0x8017, 0x8012},
	{0x0, 0x8018, 0x806b, 0x8017, 0x8006},
	{0x1, 0x8069, 0x8017, 0x8018, 0x8006},
	{0x0, 0x8009, 0x8009, 0x8018, 0x8013},
	{0x0, 0x807d, 0x8018, 0x2040, 0x2040},
	{0xe, 0x800b, 0x800b, 0x8014, 0x807f},
	{0x0, 0x8018, 0x8067, 0x800b, 0x8006},
	{0x1, 0x8065, 0x800b, 0x8018, 0x8006},
	{0x0, 0x8008, 0x8008, 0x8018, 0x8015},
	{0x0, 0x800d, 0x8063, 0x8018, 0x8006},
	{0x1, 0x8061, 0x8018, 0x800d, 0x8006},
	{0x0, 0x8009, 0x8009, 0x800d, 0x8013},
	{0xe, 0x8000, 0x801b, 0x8005, 0x8008},
	{0x0, 0x8000, 0x2040, 0x8000, 0x8007},
	{0xe, 0x8002, 0x8045, 0x8005, 0x8008},
	{0x1, 0x8002, 0x2040, 0x8002, 0x8007},
	{0xe, 0x8001, 0x801c, 0x8005, 0x8009},
	{0x0, 0x8001, 0x2040, 0x8001, 0x8007},
	{0xe, 0x8003, 0x803f, 0x8005, 0x8009},
	{0x1, 0x8003, 0x2040, 0x8003, 0x8007},
};

// Control Registers
#define _R_DECAY		0x8004
#define _R_ERLRBAL		0x8005
#define _R_DIFFUSION	0x8006
#define _R_WETMIX		0x8007

#define _R_PREDELAY_LW	0x8079
#define _R_PREDELAY_LR	0x807B
#define _R_PREDELAY_RW	0x807D
#define _R_PREDELAY_RR	0x807F


